import { v4 as uuidv4 } from 'uuid';

export const uuidToken = () => {
    // 先从本地获取uuid_token
    let uuid_token = localStorage.getItem("UUIDTOKEN");
    // 如果没有
    if(!uuid_token){
        // 生成uuid_token并本地存储
        uuid_token = uuidv4();
        localStorage.setItem("UUIDTOKEN", uuid_token);
    }

    return uuid_token;
}


